//
// Created by wze-zero on 2024/7/9 009.
//
#include <iostream>

using namespace std;

int main() {
    int m, n, v;
    for (int i = 100; i < 999; ++i) {
        m = i / 100;
        n = (i - m * 100) / 10;
        v = i - m * 100 - n * 10;
        if (m * m * m + n * n * n + v * v * v == i) {
            cout << i << endl;
        }
    }
    return 0;
}
